﻿var AngularMVCApp = angular.module('AngularMVCApp', ['ngRoute']);

AngularMVCApp.controller('LandingPageController', LandingPageController);

var configFunction = function ($routeProvider, $locationProvider) {
    //$locationProvider.hashPrefix('!').html5Mode(true);
    $routeProvider
        .when('/Hrm/Companies/Index', {
            templateUrl: '/Hrm/Companies/Index',
        })
        .when('/Hrm/Departments/Index', {
            templateUrl: '/Hrm/Departments/Index',
        })
        .when('/Hrm/Staffs/Index', {
            templateUrl: '/Hrm/Staffs/Index',
        })
        .when('/Permission/Applications/Index', {
            templateUrl: '/Permission/Applications/Index',
        })
        .when('/Permission/Applications/Create', {
            templateUrl: '/Permission/Applications/Create',
        })
        .when('/Permission/Applications/Delete/:Id', {
            templateUrl: function (params) { return '/Permission/Applications/Delete/' + params.Id }
        })
        .when('/Permission/Applications/Edit/:Id', {
            templateUrl: function (params) { return '/Permission/Applications/Edit/' + params.Id }
        })
        .when('/Permission/Applications/Details/:Id', {
            templateUrl: function (params) { return '/Permission/Applications/Details/' + params.Id }
        })
        .when('/Permission/Navigations/Index', {
            templateUrl: '/Permission/Navigations/Index',
        })
        .when('/Permission/Functions/Index', {
            templateUrl: '/Permission/Functions/Index',
        })
        .when('/Permission/Roles/Index', {
            templateUrl: '/Permission/Roles/Index',
        })
        .when('/Permission/Users/Index', {
            templateUrl: '/Permission/Users/Index',
        })
        .when('/Permission/Applications/Create', {
            templateUrl: '/Permission/Applications/Create'
        })
        .when('/Permission/Applications/Details/:Id', {
            templateUrl: function (params) { return '/Permission/Applications/Details/'+params.Id }
        });
}
configFunction.$inject = ['$routeProvider', '$locationProvider'];

AngularMVCApp.config(configFunction);